package my.netty.channel.nio;

import my.netty.channel.ClientChannel;
import my.netty.exception.ChannelException;

import java.net.InetSocketAddress;

public class NioClientSocketChannel extends NioSocketChannel implements ClientChannel {
    @Override
    public void connect(InetSocketAddress address) {
        try {
            javaChannel().connect(address);
        } catch (Throwable e) {
            close();
            throw new ChannelException("connect", e);
        }
    }
}
